1. Field of the Invention
The present invention relates in general to a network switch for routing cells derived from network data transmissions, and in particular to a buffer for a network switch input port that can store an incoming multicast cell and then forward copies of the cell to many output ports.
2. Description of Related Art
A network switch routes data transmissions such as for example IP, MPLS, ATM or ethernet packets, between network buses. A network switch typically includes a set of input ports for receiving packets arriving on the buses, a set of output ports for forwarding packets outward on the buses, and a switch fabric such as a crosspoint switch for routing packets from each input switch port to the output switch ports that are to forward them. In systems where packets are of variable size, an input port may convert each packet arriving on a network bus to a sequence of cells of uniform size which can be efficiently stored in uniformly-sized buffer memory storage locations until the input port can forward them in proper sequential order through the switch fabric to one of the switch's output ports. Each output switch port stores each cell sequence arriving from an input port in its own buffer memory. The output port later reassembles them into the packet from which they were derived, then forwards the packet outward on an another network bus.
Such a network switch input or output port includes a “cell buffer” for read and write accessing the cell memory. When the cell buffer stores a cell in a free storage location of the cell memory, it passes a pointer to that storage location, along with other information about the packet, to the port's “queue manager”. The queue manager keeps track of where cells assigned to each packet are stored in the cell memory and determines when each cell is to be forwarded from the cell memory. When a cell is to be forwarded from the cell memory, the queue manager sends a pointer to the cell's storage location to the cell buffer and the cell buffer then reads the cell out of the cell memory. In an input port the cell is sent to a switch interface circuit which then forwards the cell through the switch fabric to an output port that is to receive the cell. In an output port, the cell is sent to a “protocol processor” which resembles all cells of the same sequence into the packet from which the sequence was derived, and forwards the packet outward from the switch on a network bus.
In some networks a packet may be either a “unicast” packet destined for a single network station or a “multicast” packet destined for several network stations. Since a unicast packet is destined for only a single network station, a network switch need only forward a unicast packet outward toward a network destination station on only a single bus or bus channel. Thus when a cell buffer in an input or output port reads a cell derived from a unicast packet out of a cell memory and forwards it to a switch interface or a protocol processor, it can immediately free the space in the cell memory that held the cells.
On the other hand, since a multicast packet is destined for several network stations, a network switch may have to forward a multicast packet outward one several different buses or bus channels. Prior art network switches employ one of two strategies for handling a cell derived from a multicast transmission for which N copies or “instances” of the cell are to be forwarded. In a first strategy a multicast cell is stored at a single location in the cell memory and is forwarded N times from that location. The cell memory storage location is freed only after the Nth instance of the cell has been forwarded. The queue manager will therefore have tell the cell buffer to forward a copy of the multicast cell out of the cell memory to the switch interface N times and will have to signal the cell buffer when it can finally free the cell's storage location. One difficulty with such a system is that the logic for keeping track of the number of copies of each multicast cell have been forwarded from the cell buffer complicates the queue manager. The queue manager has to treat unicast and multicast cells differently.
Using the second strategy for handling multicast cells, a cell buffer determines how many instances of a multicast cells are to be forwarded and writes a copy of an incoming multicast cell into a separate cell memory storage location for each output port. The buffer manager sends a pointer to each stored cell copy to the queue manager. The queue manager is then able to treat each instance of a multicast cell in that same way that it treats a unicast cell. This strategy simplifies the queue manager because the queue manager does not have to treat multicast transmissions defiantly. However the need to write several copies of a multicast cell to the cell memory can reduce system throughput, particularly when the time the cell buffer needs to read and write access the cell memory is the main factor limiting the rate at which a network switch port can process incoming and outgoing cells.
What is needed is a way of handling multicast cells that allows it to treat each instance of a multicast cell in the same way that it treats a unicast cell, but which does not require the cell buffer to write multiple copies of a multicast cell to the cell memory.